﻿<div class="left-side sticky-left-side">
    <!--logo and iconic logo start-->
    <div class="logo">
        <a href="/Manager/Default"><img src="/Themes/SafeMode/images/logo.png" alt=""></a>
    </div>
    <div class="logo-icon text-center">
        <a href="/Manager/Default"><img src="/Themes/SafeMode/images/logo_icon.png" alt=""></a>
    </div>
    <!--logo and iconic logo end-->
    <div class="left-side-inner">
        <!-- visible to small devices only -->
        <div class="visible-xs hidden-sm hidden-md hidden-lg">
            <div class="media logged-user">
                <img alt="" src="/Themes/SafeMode/images/photos/user-avatar.png" class="media-object">
                <div class="media-body">
                    <h4><a href="#">John Doe</a></h4>
                    <span>"Hello There..."</span>
                </div>
            </div>
            <h5 class="left-nav-title">Account Information</h5>
            <ul class="nav nav-pills nav-stacked custom-nav">
                <li><a href="#"><i class="fa fa-user"></i> <span>Profile</span></a></li>
                <li><a href="#"><i class="fa fa-cog"></i> <span>Settings</span></a></li>
                <li><a href="#"><i class="fa fa-sign-out"></i> <span>Sign Out</span></a></li>
            </ul>
        </div>
        <!--sidebar nav start-->
        <ul class="nav nav-pills nav-stacked custom-nav" id="menu_list_ul">
            <li class="active nav-hover" id="menu4">
                <a href="/Manager/Default"><i class="fa fa-home"></i> <span>首页</span></a>
            </li>
            <li class="menu-list" id="menu1">
                <a href=""><i class="fa fa-hospital-o"></i> <span>医院管理</span></a>
                <ul class="sub-menu-list">
                    <li><a href="/Manager/Default/PerfectBusiness" title="/Manager/Default/PerfectBusiness">医院信息</a></li>
                    <li><a href="/Manager/Public/DoctorList" title="/Manager/Public/DoctorList">专家管理</a></li>
                    @*<li><a href="/Manager/Config" title="/Manager/Config">新闻公告</a></li>*@
                    <li><a href="/Manager/Public" title="/Manager/Public">挂号科室</a></li>
                    @*<li><a href="/Manager/Public/EmployeeList" title="/Manager/Public/EmployeeList">员工管理</a></li>*@
                    <li><a href="/Manager/Public/DepartmentGroup">科室管理</a></li>
                    @*<li><a href="/Manager/RegMake">挂号科室</a></li>
                        <li><a href="/Manager/RegMake/RegDepartmentGroup">预约分组</a></li>*@
                </ul>
            </li>
            <li class="menu-list" id="menu2">
                <a href=""><i class="fa fa-comment-o"></i> <span>微信管理</span></a>
                <ul class="sub-menu-list">
                    <li><a href="/Manager/Wechat">公共号管理</a></li>
                    <li><a href="/Manager/Grant">授权管理</a></li>
                    <li><a href="/Manager/Reply">默认回复</a></li>
                    <li><a href="/Manager/Reply/TextList">文本回复</a></li>
                    <li><a href="/Manager/Reply/ImageTextList">图文回复</a></li>
                    <li><a href="/Manager/WechatMenu">菜单设置</a></li>
                    <li><a href="/Manager/MsgRecord">消息群发</a></li>
                    <li><a href="/Manager/WechatUser">用户管理</a></li>
                </ul>
            </li>
            <li class="menu-list" id="menu6">
                <a href=""><i class="fa fa-bullhorn"></i> <span>新闻管理</span></a>
                <ul class="sub-menu-list">
                    <li><a href="/Manager/News">医院公告</a></li>
                    <li><a href="/Manager/Wechat">就诊指南</a></li>
                    <li><a href="/Manager/Grant">健康宣教</a></li>
                    <li><a href="/Manager/Reply">停诊通知</a></li>
                    <li><a href="/Manager/Wechat/WechatTag">主题分类</a></li>
                </ul>
            </li>
            <li class="menu-list" id="menu5">
                <a href=""><i class="fa fa-medkit"></i> <span>疾病管理</span></a>
                <ul class="sub-menu-list">
                    <li><a href="/Manager/Pub">疾病管理</a></li>
                    @*<li><a href="/Manager/Pub/">症状管理</a></li>*@
                    <li><a href="/Manager/Pub/PubType">分类管理</a></li>
                </ul>
            </li>
            <li class="menu-list" id="menu3">
                <a href=""><i class="fa fa-cogs"></i> <span>系统设置</span></a>
                <ul class="sub-menu-list"></ul>
            </li>
        </ul>
        <!--sidebar nav end-->
    </div>
</div>
<script src="/Themes/SafeMode/js/jquery.cookie.js"></script>
<script type="text/javascript" src="/Themes/SafeMode/js/jquery-1.10.2.min.js"></script>
<script type="text/javascript">
    var newUrl = (window.location.href).substring(window.location.href.indexOf('/Manager'), window.location.href.length);
    var n = newUrl.indexOf('?');
    if (n > 0) {
        newUrl = newUrl.substring(0, n);
    }
    //var newUrl = (window.location.href).replace('http://localhost', '');
    //var menu_Array = ["/Manager/Default/PerfectBusiness|1", "/Manager/Public|1", "/Manager/Public/EmployeeList|1", "/Manager/Config|1"];
    var menu_Array = ["/Manager/Default|0", "/Manager/Default/PerfectBusiness|1", "/Manager/Public|1", "/Manager/Public/EmployeeList|1", "/Manager/Public/DoctorList|1", "/Manager/Public/DoctorDetail|1", "/Manager/Public/EmployeeOrExpertDetail|1", "/Manager/Config|1", "/Manager/Wechat|2", "/Manager/Wechat/WechatTag|2", "/Manager/wechat/WechatOrExpertDetail|2", "/Manager/Grant|2", "/Manager/Reply|2", "/Manager/Reply/TextList|2", "/Manager/Reply/TextDetail|2", "/Manager/Reply/ImageTextList|2", "/Manager/Reply/ImageTextDetail|2", "/Manager/WechatMenu|2", "/Manager/MsgRecord|2", "/Manager/WechatUser|2", "/Manager/RegMake|1", "/Manager/RegMake/RegDepartmentGroup|1", "/Manager/Public/DepartmentGroup|1", "/Manager/Pub|5", "/Manager/Pub/PubDisease|5", "/Manager/Pub/PubType|5"];

    if (newUrl == "/Manager/Default") {
        document.getElementById("menu4").className = "active nav-hover";
    }
    else {
        document.getElementById("menu4").className = "nav-hover";
        for (var k = 0; k < menu_Array.length; k++) {
            if (menu_Array[k].split('|')[0] == newUrl) {
                document.getElementById("menu" + menu_Array[k].split('|')[1]).className = "menu-list nav-active nav-hover";
                for (var n = 0; n < $("#menu" + menu_Array[k].split('|')[1] + " ul").children().length; n++) {
                    if (isUrl(newUrl) == $("#menu" + menu_Array[k].split('|')[1] + " ul").children().eq(n).children().attr("href")) {
                        $("#menu" + menu_Array[k].split('|')[1] + " ul").children().eq(n).addClass("active");
                    }
                }
            }
        }
    }

    function isUrl(url) {
        if (url == "/Manager/wechat/WechatOrExpertDetail") {
            url = "/Manager/Wechat";
        }
        else if (url == "/Manager/Reply/ImageTextDetail") {
            url = "/Manager/Reply/ImageTextList";
        }
        else if (url == "/Manager/Reply/TextDetail") {
            url = "/Manager/Reply/TextList";
        }
        else if (url == "/Manager/Public/EmployeeOrExpertDetail") {
            url = "/Manager/Public/EmployeeList";
        }
        else if (url == "/Manager/Public/DoctorDetail") {
            url = "/Manager/Public/DoctorList";
        }
        else if (url == "/Manager/Pub/PubDisease") {
            url = "/Manager/Pub";
        }
        else if (url == "/Manager/Wechat/WechatTag") {
            url = "/Manager/Wechat";
        }

        return url;
    }

</script>